<!DOCTYPE HTML>
<html lang="zh-CN">


<head>
    <meta charset="utf-8">
    <meta name="keywords" content="「ROAD 6」HTML, HTTISHERE">
    <meta name="description" content="">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit|ie-stand|ie-comp">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <!-- Global site tag (gtag.js) - Google Analytics -->


    <title>「ROAD 6」HTML | HTTISHERE</title>
    <link rel="icon" type="image/x-icon, image/vnd.microsoft.icon" href="/favicon.ico">

    <link rel="stylesheet" type="text/css" href="/libs/awesome/css/all.css">
    <link rel="stylesheet" type="text/css" href="/libs/materialize/materialize.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/aos/aos.css">
    <link rel="stylesheet" type="text/css" href="/libs/animate/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/lightGallery/css/lightgallery.min.css">
    <link rel="stylesheet" type="text/css" href="/css/matery.css">
    <link rel="stylesheet" type="text/css" href="/css/my.css">

    <script src="/libs/jquery/jquery.min.js"></script>

<meta name="generator" content="Hexo 5.2.0"></head>




<body>
    <header class="navbar-fixed">
    <nav id="headNav" class="bg-color nav-transparent">
        <div id="navContainer" class="nav-wrapper container">
            <div class="brand-logo">
                <a href="/" class="waves-effect waves-light">
                    
                    <img src="/medias/avatar.png" class="logo-img" alt="LOGO">
                    
                    <span class="logo-span">HTTISHERE</span>
                </a>
            </div>
            

<a href="#" data-target="mobile-nav" class="sidenav-trigger button-collapse"><i class="fas fa-bars"></i></a>
<ul class="right nav-menu">
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/" class="waves-effect waves-light">
      
      <i class="fas fa-home" style="zoom: 0.6;"></i>
      
      <span>首页</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/tags" class="waves-effect waves-light">
      
      <i class="fas fa-tags" style="zoom: 0.6;"></i>
      
      <span>标签</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/categories" class="waves-effect waves-light">
      
      <i class="fas fa-bookmark" style="zoom: 0.6;"></i>
      
      <span>分类</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/archives" class="waves-effect waves-light">
      
      <i class="fas fa-archive" style="zoom: 0.6;"></i>
      
      <span>归档</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/about" class="waves-effect waves-light">
      
      <i class="fas fa-user-circle" style="zoom: 0.6;"></i>
      
      <span>关于</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/friends" class="waves-effect waves-light">
      
      <i class="fas fa-address-book" style="zoom: 0.6;"></i>
      
      <span>友情链接</span>
    </a>
    
  </li>
  
  <li>
    <a href="#searchModal" class="modal-trigger waves-effect waves-light">
      <i id="searchIcon" class="fas fa-search" title="搜索" style="zoom: 0.85;"></i>
    </a>
  </li>
</ul>


<div id="mobile-nav" class="side-nav sidenav">

    <div class="mobile-head bg-color">
        
        <img src="/medias/avatar.png" class="logo-img circle responsive-img">
        
        <div class="logo-name">HTTISHERE</div>
        <div class="logo-desc">
            
            Never really desperate, only the lost of the soul.
            
        </div>
    </div>

    

    <ul class="menu-list mobile-menu-list">
        
        <li class="m-nav-item">
	  
		<a href="/" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-home"></i>
			
			首页
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/tags" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-tags"></i>
			
			标签
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/categories" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-bookmark"></i>
			
			分类
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/archives" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-archive"></i>
			
			归档
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/about" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-user-circle"></i>
			
			关于
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/friends" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-address-book"></i>
			
			友情链接
		</a>
          
        </li>
        
        
    </ul>
</div>


        </div>

        
    </nav>

</header>

    
<script src="/libs/cryptojs/crypto-js.min.js"></script>
<script>
    (function() {
        let pwd = '';
        if (pwd && pwd.length > 0) {
            if (pwd !== CryptoJS.SHA256(prompt('请输入访问本文章的密码')).toString(CryptoJS.enc.Hex)) {
                alert('密码错误，将返回主页！');
                location.href = '/';
            }
        }
    })();
</script>




<div class="bg-cover pd-header post-cover" style="background-image: url('/medias/featureimages/cover-bg-3.jpg')">
    <div class="container" style="right: 0px;left: 0px;">
        <div class="row">
            <div class="col s12 m12 l12">
                <div class="brand">
                    <h1 class="description center-align post-title">「ROAD 6」HTML</h1>
                </div>
            </div>
        </div>
    </div>
</div>



<main class="post-container content">

    
    <link rel="stylesheet" href="/libs/tocbot/tocbot.css">
<style>
    #articleContent h1::before,
    #articleContent h2::before,
    #articleContent h3::before,
    #articleContent h4::before,
    #articleContent h5::before,
    #articleContent h6::before {
        display: block;
        content: " ";
        height: 100px;
        margin-top: -100px;
        visibility: hidden;
    }

    #articleContent :focus {
        outline: none;
    }

    .toc-fixed {
        position: fixed;
        top: 64px;
    }

    .toc-widget {
        width: 345px;
        padding-left: 20px;
    }

    .toc-widget .toc-title {
        padding: 35px 0 15px 17px;
        font-size: 1.5rem;
        font-weight: bold;
        line-height: 1.5rem;
    }

    .toc-widget ol {
        padding: 0;
        list-style: none;
    }

    #toc-content {
        padding-bottom: 30px;
        overflow: auto;
    }

    #toc-content ol {
        padding-left: 10px;
    }

    #toc-content ol li {
        padding-left: 10px;
    }

    #toc-content .toc-link:hover {
        font-weight: 700;
        text-decoration: underline;
    }

    #toc-content .toc-link::before {
        background-color: transparent;
        max-height: 25px;

        position: absolute;
        right: 23.5vw;
        display: block;
    }

    #toc-content .is-active-link {
    }

    #floating-toc-btn {
        position: fixed;
        right: 15px;
        bottom: 76px;
        padding-top: 15px;
        margin-bottom: 0;
        z-index: 998;
    }

    #floating-toc-btn .btn-floating {
        width: 48px;
        height: 48px;
    }

    #floating-toc-btn .btn-floating i {
        line-height: 48px;
        font-size: 1.4rem;
    }
</style>
<div class="row">
    <div id="main-content" class="col s12 m12 l9">
        <!-- 文章内容详情 -->
<div id="artDetail">
    <div class="card">
        <div class="card-content article-info">
            <div class="row tag-cate">
                <div class="col s7">
                    
                    <div class="article-tag">
                        
                            <a href="/tags/ROAD-6/">
                                <span class="chip bg-color">ROAD 6</span>
                            </a>
                        
                    </div>
                    
                </div>
                <div class="col s5 right-align">
                    
                    <div class="post-cate">
                        <i class="fas fa-bookmark fa-fw icon-category"></i>
                        
                            <a href="/categories/%E5%A4%A7%E5%89%8D%E7%AB%AF/" class="post-category">
                                大前端
                            </a>
                        
                    </div>
                    
                </div>
            </div>

            <div class="post-info">
                
                <div class="post-date info-break-policy">
                    <i class="far fa-calendar-minus fa-fw"></i>发布日期:&nbsp;&nbsp;
                    2021-12-20
                </div>
                

                

                
                <div class="info-break-policy">
                    <i class="far fa-file-word fa-fw"></i>文章字数:&nbsp;&nbsp;
                    1.6k
                </div>
                

                
                <div class="info-break-policy">
                    <i class="far fa-clock fa-fw"></i>阅读时长:&nbsp;&nbsp;
                    8 分
                </div>
                

                
                    <div id="busuanzi_container_page_pv" class="info-break-policy">
                        <i class="far fa-eye fa-fw"></i>阅读次数:&nbsp;&nbsp;
                        <span id="busuanzi_value_page_pv"></span>
                    </div>
				
            </div>
        </div>
        <hr class="clearfix">

        
        <!-- 是否加载使用自带的 prismjs. -->
        <link rel="stylesheet" href="/libs/prism/prism.css">
        

        

        <div class="card-content article-card-content">
            <div id="articleContent">
                <blockquote>
<p>定义：XML 和 SGML。</p>
</blockquote>
<h3 id="namespace"><a href="#namespace" class="headerlink" title="namespace"></a>namespace</h3><h3 id="HTML-标签-语义"><a href="#HTML-标签-语义" class="headerlink" title="HTML 标签-语义"></a>HTML 标签-语义</h3><h3 id="HTML-语法"><a href="#HTML-语法" class="headerlink" title="HTML 语法"></a>HTML 语法</h3><h4 id="合法元素"><a href="#合法元素" class="headerlink" title="合法元素"></a>合法元素</h4><ul>
<li>Element：<code>&lt;tag&gt;&lt;/tag&gt;</code></li>
<li>Text：<code>text</code></li>
<li>Comment：<code>&lt;!-- comments --&gt;</code></li>
<li>DocunmentType：<code>&lt;!DOCTYPE html&gt;</code></li>
<li>ProcessingInstruction：<code>&lt;?a 1?&gt;</code></li>
<li>CDATA：<code>&lt;![CDATA[]]&gt;</code></li>
</ul>
<h4 id="字符引用"><a href="#字符引用" class="headerlink" title="字符引用"></a>字符引用</h4><ul>
<li><code>¡</code></li>
<li><code>&amp;</code></li>
<li><code>&lt;</code></li>
<li><code>&quot;</code></li>
</ul>
<p><img src="[https://gitee.com/httishere/blog-image/raw/master/img/image](https://gitee.com/httishere/blog-image/raw/master/img/image" alt=""> (1).png)</p>
<p><code>DocumentFragment</code>不存在任何 DOM 树上，但是也非常有用，它常常被用来高性能地批量添加节点。</p>
<h3 id="DOM-API"><a href="#DOM-API" class="headerlink" title="DOM API"></a>DOM API</h3><h4 id="导航类操作（可能会实时变化）"><a href="#导航类操作（可能会实时变化）" class="headerlink" title="导航类操作（可能会实时变化）"></a>导航类操作（可能会实时变化）</h4><ul>
<li>parentNode</li>
<li>childNodes</li>
<li>firstChild</li>
<li>lastChild</li>
<li>nextSibling</li>
<li>previousSibling</li>
</ul>
<h4 id="修改操作"><a href="#修改操作" class="headerlink" title="修改操作"></a>修改操作</h4><ul>
<li>appendChild</li>
<li>insertBefore</li>
<li>removeChild</li>
<li>replaceChild</li>
</ul>
<p>PS：一个 Element 只有一个父元素，不可以被多次 append 或者 insert，如果重复 insert 的话会默认从之前的位置 remove 再 insert 到新位置。</p>
<h4 id="高级操作"><a href="#高级操作" class="headerlink" title="高级操作"></a>高级操作</h4><ul>
<li>compareDocumentPosition：用于比较两个节点中关系的函数。</li>
<li>contains：检查一个节点是否包含另一个节点的函数。</li>
<li>isEqualNode：检查两个节点是否完全相同。</li>
<li>isSameNode：检查两个节点是否是同一个节点，实际上在 JavaScript 中可以用“===”。</li>
<li>cloneNode：复制一个节点，如果传入参数 true，则会连同子元素做深拷贝。</li>
</ul>
<h3 id="Events"><a href="#Events" class="headerlink" title="Events"></a><a target="_blank" rel="noopener" href="https://developer.mozilla.org/zh-CN/docs/Web/API/EventTarget">Events</a></h3><ul>
<li>捕获过程（从 Root 节点开始找到目标节点）</li>
<li>冒泡过程（从目标节点向上触发事件）</li>
</ul>
<p>同一元素上先捕获再冒泡。</p>
<h3 id="Range"><a href="#Range" class="headerlink" title="Range"></a>Range</h3><blockquote>
<p>问题：如何把一个元素的所有子元素逆序。</p>
<p>我的解法：</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>root<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span><span class="token punctuation">></span></span>1<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">></span></span>2<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">></span></span>3<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>em</span><span class="token punctuation">></span></span>4<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>em</span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>#<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>5<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span><span class="token punctuation">></span></span><span class="token script"><span class="token language-javascript">
  <span class="token keyword">let</span> element <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">"root"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

  <span class="token keyword">function</span> <span class="token function">reverseChildren</span><span class="token punctuation">(</span><span class="token parameter">element</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
    <span class="token keyword">let</span> child <span class="token operator">=</span> element<span class="token punctuation">.</span>childNodes<span class="token punctuation">;</span>
    <span class="token keyword">let</span> len <span class="token operator">=</span> child<span class="token punctuation">.</span>length<span class="token punctuation">;</span>
    <span class="token keyword">while</span> <span class="token punctuation">(</span>len<span class="token operator">--</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
      <span class="token comment">// 不需要先去remove</span>
      element<span class="token punctuation">.</span><span class="token function">appendChild</span><span class="token punctuation">(</span>child<span class="token punctuation">[</span>len <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">&#125;</span>
  <span class="token punctuation">&#125;</span>

  <span class="token function">reverseChildren</span><span class="token punctuation">(</span>element<span class="token punctuation">)</span><span class="token punctuation">;</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>script</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p><code>Range API</code>也是隶属于<code>DOM API</code>，<code>Range API</code>表示一个 HTML 上的范围，这个范围是以<strong>文字</strong>为最小单位的，所以 Range 不一定包含完整的节点，它可能是 Text 节点中的一段，也可以是头尾两个 Text 的一部分加上中间的元素。</p>
<pre class="line-numbers language-javascript" data-language="javascript"><code class="language-javascript"><span class="token keyword">var</span> range <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Range</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
range<span class="token punctuation">.</span><span class="token function">setStart</span><span class="token punctuation">(</span>element<span class="token punctuation">,</span> <span class="token number">9</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
range<span class="token punctuation">.</span><span class="token function">setEnd</span><span class="token punctuation">(</span>element<span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// 可以从用户选中区域创建，这样的 Range 用于处理用户选中区域</span>
<span class="token keyword">let</span> range <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">getSelection</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getRangeAt</span><span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<h4 id="主要-API："><a href="#主要-API：" class="headerlink" title="主要 API："></a>主要 API：</h4><ul>
<li><code>[Range.setStart()](https://developer.mozilla.org/zh-CN/docs/Web/API/Range/setStart)</code>：“设置 <code>Range</code> 的起点。</li>
<li><code>[Range.setEnd()](https://developer.mozilla.org/zh-CN/docs/Web/API/Range/setEnd)</code>：设置 <code>Range</code> 的终点。</li>
</ul>
<h4 id="辅助-API："><a href="#辅助-API：" class="headerlink" title="辅助 API："></a>辅助 API：</h4><ul>
<li><code>[Range.setStartBefore()](https://developer.mozilla.org/zh-CN/docs/Web/API/Range/setStartBefore)</code>：以其它<code>[节点](https://developer.mozilla.org/zh-CN/docs/Web/API/Node)</code>为基准，设置 <code>Range</code> 的起点。</li>
<li><code>[Range.setStartAfter()](https://developer.mozilla.org/en-US/docs/Web/API/Range/setStartAfter)</code><a target="_blank" rel="noopener" href="https://developer.mozilla.org/en-US/docs/Web/API/Range/setStartAfter"> (en-US)</a>：以其它<code>[节点](https://developer.mozilla.org/zh-CN/docs/Web/API/Node)</code>为基准，设置 <code>Range</code> 的起点。</li>
<li><code>[Range.setEndBefore()](https://developer.mozilla.org/en-US/docs/Web/API/Range/setEndBefore)</code><a target="_blank" rel="noopener" href="https://developer.mozilla.org/en-US/docs/Web/API/Range/setEndBefore"> (en-US)</a>：以其它<code>[节点](https://developer.mozilla.org/zh-CN/docs/Web/API/Node)</code>为基准，设置 <code>Range</code> 的终点。</li>
<li><code>[Range.setEndAfter()](https://developer.mozilla.org/en-US/docs/Web/API/Range/setEndAfter)</code><a target="_blank" rel="noopener" href="https://developer.mozilla.org/en-US/docs/Web/API/Range/setEndAfter"> (en-US)</a>：以其它<code>[节点](https://developer.mozilla.org/zh-CN/docs/Web/API/Node)</code>为基准，设置 <code>Range</code> 的终点。</li>
<li><code>[Range.selectNode()](https://developer.mozilla.org/zh-CN/docs/Web/API/Range/selectNode)</code>：使 <code>Range</code> 包含某个<code>[节点](https://developer.mozilla.org/zh-CN/docs/Web/API/Node)</code>及其内容。</li>
<li><code>[Range.selectNodeContents()](https://developer.mozilla.org/zh-CN/docs/Web/API/Range/selectNodeContents)</code>：使 <code>Range</code> 包含某个<code>[节点](https://developer.mozilla.org/zh-CN/docs/Web/API/Node)</code>的内容。</li>
<li><code>[Range.extractContents()](https://developer.mozilla.org/zh-CN/docs/Web/API/Range/extractContents)</code>：把 <code>Range</code> 的内容从文档树移动到一个<code>[文档片段](https://developer.mozilla.org/zh-CN/docs/Web/API/DocumentFragment)</code>中。</li>
</ul>
<h4 id="使用Range-API解决开头的问题："><a href="#使用Range-API解决开头的问题：" class="headerlink" title="使用Range API解决开头的问题："></a>使用<code>Range API</code>解决开头的问题：</h4><pre class="line-numbers language-javascript" data-language="javascript"><code class="language-javascript"><span class="token comment">// 减少对DOM树操作的次数</span>
<span class="token keyword">function</span> <span class="token function">reverseChildrenByRange</span><span class="token punctuation">(</span><span class="token parameter">element</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
  <span class="token keyword">let</span> range <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Range</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  range<span class="token punctuation">.</span><span class="token function">selectNodeContents</span><span class="token punctuation">(</span>element<span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">// 选取所有子节点</span>
  <span class="token keyword">let</span> fragment <span class="token operator">=</span> range<span class="token punctuation">.</span><span class="token function">extractContents</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">// 移至文档片段</span>
  <span class="token keyword">let</span> l <span class="token operator">=</span> fragment<span class="token punctuation">.</span>childNodes<span class="token punctuation">.</span>length<span class="token punctuation">;</span>
  <span class="token keyword">while</span> <span class="token punctuation">(</span>l<span class="token operator">--</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
    fragment<span class="token punctuation">.</span><span class="token function">appendChild</span><span class="token punctuation">(</span>fragment<span class="token punctuation">.</span>childNodes<span class="token punctuation">[</span>l<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">&#125;</span>
  element<span class="token punctuation">.</span><span class="token function">appendChild</span><span class="token punctuation">(</span>fragment<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>实践：适合类似富文本之类的开发。</p>
<h3 id="CSSOM"><a href="#CSSOM" class="headerlink" title="CSSOM"></a>CSSOM</h3><h4 id="document-styleSheets"><a href="#document-styleSheets" class="headerlink" title="document.styleSheets"></a><code>document.styleSheets</code></h4><h4 id="Rules"><a href="#Rules" class="headerlink" title="Rules"></a>Rules</h4><ul>
<li><code>document.styleSheets[0].cssRules</code></li>
<li><code>document.styleSheets[0].insertRule(&quot;p &#123;color: pink&#125;&quot;, 0)</code>，insert 的是字符串</li>
<li><code>document.styleSheets[0].removeRule(0)</code></li>
</ul>
<h4 id="Rule"><a href="#Rule" class="headerlink" title="Rule"></a>Rule</h4><ul>
<li>CSSStyleRule</li>
<li>CSSCharsetRule</li>
<li>CSSImportRule</li>
<li>…</li>
</ul>
<h5 id="CSSStyleRule"><a href="#CSSStyleRule" class="headerlink" title="CSSStyleRule"></a>CSSStyleRule</h5><ul>
<li>selectorText: String</li>
<li>style: k-v 结构</li>
</ul>
<h4 id="getComputedStyle"><a href="#getComputedStyle" class="headerlink" title="getComputedStyle"></a><a target="_blank" rel="noopener" href="https://developer.mozilla.org/zh-CN/docs/Web/API/Window/getComputedStyle">getComputedStyle</a></h4><ul>
<li><code>window.getComputedStyle(elt, pseudoElt);</code><ul>
<li>elt: 想要获取的元素</li>
<li>pseudoElt（可选）：指定一个要匹配的伪元素的字符串</li>
</ul>
</li>
</ul>
<h3 id="window-API"><a href="#window-API" class="headerlink" title="window API"></a>window API</h3><ul>
<li><code>window.open()</code>: <code>window.open(&#39;about:blank&#39;, &#39;_blank&#39;)</code></li>
<li><code>widnow.moveBy()</code></li>
<li><code>widnow.moveTo()</code></li>
<li><code>window.close()</code></li>
<li>…还有部分滚动相关 API</li>
</ul>
<h3 id="获取所有-API"><a href="#获取所有-API" class="headerlink" title="获取所有 API"></a>获取所有 API</h3><pre class="line-numbers language-javascript" data-language="javascript"><code class="language-javascript"><span class="token keyword">let</span> names <span class="token operator">=</span> Object<span class="token punctuation">.</span><span class="token function">getOwnPropertyNames</span><span class="token punctuation">(</span>window<span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token keyword">function</span> <span class="token function">filterOut</span><span class="token punctuation">(</span><span class="token parameter">names<span class="token punctuation">,</span> props</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
  <span class="token keyword">let</span> set <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Set</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  props<span class="token punctuation">.</span><span class="token function">forEach</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">o</span><span class="token punctuation">)</span> <span class="token operator">=></span> set<span class="token punctuation">.</span><span class="token function">add</span><span class="token punctuation">(</span>o<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token keyword">return</span> names<span class="token punctuation">.</span><span class="token function">filter</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">e</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token operator">!</span>set<span class="token punctuation">.</span><span class="token function">has</span><span class="token punctuation">(</span>e<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>

<span class="token comment">// ECMA 262</span>
<span class="token punctuation">&#123;</span>
  <span class="token keyword">let</span> js <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Set</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token keyword">let</span> objects <span class="token operator">=</span> <span class="token punctuation">[</span>
    <span class="token string">"globalThis"</span><span class="token punctuation">,</span>
    <span class="token string">"console"</span><span class="token punctuation">,</span>
    <span class="token string">"BigInt"</span><span class="token punctuation">,</span>
    <span class="token string">"BigInt64Array"</span><span class="token punctuation">,</span>
    <span class="token string">"BigUint64Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Infinity"</span><span class="token punctuation">,</span>
    <span class="token string">"NaN"</span><span class="token punctuation">,</span>
    <span class="token string">"undefined"</span><span class="token punctuation">,</span>
    <span class="token string">"eval"</span><span class="token punctuation">,</span>
    <span class="token string">"isFinite"</span><span class="token punctuation">,</span>
    <span class="token string">"isNaN"</span><span class="token punctuation">,</span>
    <span class="token string">"parseFloat"</span><span class="token punctuation">,</span>
    <span class="token string">"parseInt"</span><span class="token punctuation">,</span>
    <span class="token string">"decodeURI"</span><span class="token punctuation">,</span>
    <span class="token string">"decodeURIComponent"</span><span class="token punctuation">,</span>
    <span class="token string">"encodeURI"</span><span class="token punctuation">,</span>
    <span class="token string">"encodeURIComponent"</span><span class="token punctuation">,</span>
    <span class="token string">"Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Date"</span><span class="token punctuation">,</span>
    <span class="token string">"RegExp"</span><span class="token punctuation">,</span>
    <span class="token string">"Promise"</span><span class="token punctuation">,</span>
    <span class="token string">"Proxy"</span><span class="token punctuation">,</span>
    <span class="token string">"Map"</span><span class="token punctuation">,</span>
    <span class="token string">"WeakMap"</span><span class="token punctuation">,</span>
    <span class="token string">"Set"</span><span class="token punctuation">,</span>
    <span class="token string">"WeakSet"</span><span class="token punctuation">,</span>
    <span class="token string">"Function"</span><span class="token punctuation">,</span>
    <span class="token string">"Boolean"</span><span class="token punctuation">,</span>
    <span class="token string">"String"</span><span class="token punctuation">,</span>
    <span class="token string">"Number"</span><span class="token punctuation">,</span>
    <span class="token string">"Symbol"</span><span class="token punctuation">,</span>
    <span class="token string">"Object"</span><span class="token punctuation">,</span>
    <span class="token string">"Error"</span><span class="token punctuation">,</span>
    <span class="token string">"EvalError"</span><span class="token punctuation">,</span>
    <span class="token string">"RangeError"</span><span class="token punctuation">,</span>
    <span class="token string">"ReferenceError"</span><span class="token punctuation">,</span>
    <span class="token string">"SyntaxError"</span><span class="token punctuation">,</span>
    <span class="token string">"TypeError"</span><span class="token punctuation">,</span>
    <span class="token string">"URIError"</span><span class="token punctuation">,</span>
    <span class="token string">"ArrayBuffer"</span><span class="token punctuation">,</span>
    <span class="token string">"SharedArrayBuffer"</span><span class="token punctuation">,</span>
    <span class="token string">"DataView"</span><span class="token punctuation">,</span>
    <span class="token string">"Float32Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Float64Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Int8Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Int16Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Int32Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Uint8Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Uint16Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Uint32Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Uint8ClampedArray"</span><span class="token punctuation">,</span>
    <span class="token string">"Atomics"</span><span class="token punctuation">,</span>
    <span class="token string">"JSON"</span><span class="token punctuation">,</span>
    <span class="token string">"Math"</span><span class="token punctuation">,</span>
    <span class="token string">"Reflect"</span><span class="token punctuation">,</span>
    <span class="token string">"escape"</span><span class="token punctuation">,</span>
    <span class="token string">"unescape"</span><span class="token punctuation">,</span>
  <span class="token punctuation">]</span><span class="token punctuation">;</span>
  objects<span class="token punctuation">.</span><span class="token function">forEach</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">o</span><span class="token punctuation">)</span> <span class="token operator">=></span> js<span class="token punctuation">.</span><span class="token function">add</span><span class="token punctuation">(</span>o<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  names <span class="token operator">=</span> names<span class="token punctuation">.</span><span class="token function">filter</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">e</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token operator">!</span>js<span class="token punctuation">.</span><span class="token function">has</span><span class="token punctuation">(</span>e<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>

names <span class="token operator">=</span> names
  <span class="token punctuation">.</span><span class="token function">filter</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">e</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
    <span class="token keyword">try</span> <span class="token punctuation">&#123;</span>
      <span class="token keyword">return</span> <span class="token operator">!</span><span class="token punctuation">(</span>window<span class="token punctuation">[</span>e<span class="token punctuation">]</span><span class="token punctuation">.</span>prototype <span class="token keyword">instanceof</span> <span class="token class-name">Node</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">&#125;</span> <span class="token keyword">catch</span> <span class="token punctuation">(</span>err<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
      <span class="token keyword">return</span> <span class="token boolean">true</span><span class="token punctuation">;</span>
    <span class="token punctuation">&#125;</span>
  <span class="token punctuation">&#125;</span><span class="token punctuation">)</span>
  <span class="token punctuation">.</span><span class="token function">filter</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">e</span><span class="token punctuation">)</span> <span class="token operator">=></span> e <span class="token operator">!=</span> <span class="token string">"Node"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

names <span class="token operator">=</span> names<span class="token punctuation">.</span><span class="token function">filter</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">e</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token operator">!</span>e<span class="token punctuation">.</span><span class="token function">match</span><span class="token punctuation">(</span><span class="token regex"><span class="token regex-delimiter">/</span><span class="token regex-source language-regex">^on</span><span class="token regex-delimiter">/</span></span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

names <span class="token operator">=</span> names<span class="token punctuation">.</span><span class="token function">filter</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">e</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token operator">!</span>e<span class="token punctuation">.</span><span class="token function">match</span><span class="token punctuation">(</span><span class="token regex"><span class="token regex-delimiter">/</span><span class="token regex-source language-regex">^webkit</span><span class="token regex-delimiter">/</span></span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">//https://html.spec.whatwg.org/#window</span>

<span class="token punctuation">&#123;</span>
  <span class="token keyword">let</span> names <span class="token operator">=</span> Object<span class="token punctuation">.</span><span class="token function">getOwnPropertyNames</span><span class="token punctuation">(</span>window<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token keyword">let</span> js <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Set</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token keyword">let</span> objects <span class="token operator">=</span> <span class="token punctuation">[</span>
    <span class="token string">"BigInt"</span><span class="token punctuation">,</span>
    <span class="token string">"BigInt64Array"</span><span class="token punctuation">,</span>
    <span class="token string">"BigUint64Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Infinity"</span><span class="token punctuation">,</span>
    <span class="token string">"NaN"</span><span class="token punctuation">,</span>
    <span class="token string">"undefined"</span><span class="token punctuation">,</span>
    <span class="token string">"eval"</span><span class="token punctuation">,</span>
    <span class="token string">"isFinite"</span><span class="token punctuation">,</span>
    <span class="token string">"isNaN"</span><span class="token punctuation">,</span>
    <span class="token string">"parseFloat"</span><span class="token punctuation">,</span>
    <span class="token string">"parseInt"</span><span class="token punctuation">,</span>
    <span class="token string">"decodeURI"</span><span class="token punctuation">,</span>
    <span class="token string">"decodeURIComponent"</span><span class="token punctuation">,</span>
    <span class="token string">"encodeURI"</span><span class="token punctuation">,</span>
    <span class="token string">"encodeURIComponent"</span><span class="token punctuation">,</span>
    <span class="token string">"Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Date"</span><span class="token punctuation">,</span>
    <span class="token string">"RegExp"</span><span class="token punctuation">,</span>
    <span class="token string">"Promise"</span><span class="token punctuation">,</span>
    <span class="token string">"Proxy"</span><span class="token punctuation">,</span>
    <span class="token string">"Map"</span><span class="token punctuation">,</span>
    <span class="token string">"WeakMap"</span><span class="token punctuation">,</span>
    <span class="token string">"Set"</span><span class="token punctuation">,</span>
    <span class="token string">"WeakSet"</span><span class="token punctuation">,</span>
    <span class="token string">"Function"</span><span class="token punctuation">,</span>
    <span class="token string">"Boolean"</span><span class="token punctuation">,</span>
    <span class="token string">"String"</span><span class="token punctuation">,</span>
    <span class="token string">"Number"</span><span class="token punctuation">,</span>
    <span class="token string">"Symbol"</span><span class="token punctuation">,</span>
    <span class="token string">"Object"</span><span class="token punctuation">,</span>
    <span class="token string">"Error"</span><span class="token punctuation">,</span>
    <span class="token string">"EvalError"</span><span class="token punctuation">,</span>
    <span class="token string">"RangeError"</span><span class="token punctuation">,</span>
    <span class="token string">"ReferenceError"</span><span class="token punctuation">,</span>
    <span class="token string">"SyntaxError"</span><span class="token punctuation">,</span>
    <span class="token string">"TypeError"</span><span class="token punctuation">,</span>
    <span class="token string">"URIError"</span><span class="token punctuation">,</span>
    <span class="token string">"ArrayBuffer"</span><span class="token punctuation">,</span>
    <span class="token string">"SharedArrayBuffer"</span><span class="token punctuation">,</span>
    <span class="token string">"DataView"</span><span class="token punctuation">,</span>
    <span class="token string">"Float32Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Float64Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Int8Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Int16Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Int32Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Uint8Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Uint16Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Uint32Array"</span><span class="token punctuation">,</span>
    <span class="token string">"Uint8ClampedArray"</span><span class="token punctuation">,</span>
    <span class="token string">"Atomics"</span><span class="token punctuation">,</span>
    <span class="token string">"JSON"</span><span class="token punctuation">,</span>
    <span class="token string">"Math"</span><span class="token punctuation">,</span>
    <span class="token string">"Reflect"</span><span class="token punctuation">,</span>
    <span class="token string">"escape"</span><span class="token punctuation">,</span>
    <span class="token string">"unescape"</span><span class="token punctuation">,</span>
  <span class="token punctuation">]</span><span class="token punctuation">;</span>
  objects<span class="token punctuation">.</span><span class="token function">forEach</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">o</span><span class="token punctuation">)</span> <span class="token operator">=></span> js<span class="token punctuation">.</span><span class="token function">add</span><span class="token punctuation">(</span>o<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  names <span class="token operator">=</span> names<span class="token punctuation">.</span><span class="token function">filter</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">e</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token operator">!</span>js<span class="token punctuation">.</span><span class="token function">has</span><span class="token punctuation">(</span>e<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

  names <span class="token operator">=</span> names
    <span class="token punctuation">.</span><span class="token function">filter</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">e</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
      <span class="token keyword">try</span> <span class="token punctuation">&#123;</span>
        <span class="token keyword">return</span> <span class="token operator">!</span><span class="token punctuation">(</span>window<span class="token punctuation">[</span>e<span class="token punctuation">]</span><span class="token punctuation">.</span>prototype <span class="token keyword">instanceof</span> <span class="token class-name">Node</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
      <span class="token punctuation">&#125;</span> <span class="token keyword">catch</span> <span class="token punctuation">(</span>err<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
        <span class="token keyword">return</span> <span class="token boolean">true</span><span class="token punctuation">;</span>
      <span class="token punctuation">&#125;</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">)</span>
    <span class="token punctuation">.</span><span class="token function">filter</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">e</span><span class="token punctuation">)</span> <span class="token operator">=></span> e <span class="token operator">!=</span> <span class="token string">"Node"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

  <span class="token keyword">let</span> windowprops <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Set</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  objects <span class="token operator">=</span> <span class="token punctuation">[</span>
    <span class="token string">"window"</span><span class="token punctuation">,</span>
    <span class="token string">"self"</span><span class="token punctuation">,</span>
    <span class="token string">"document"</span><span class="token punctuation">,</span>
    <span class="token string">"name"</span><span class="token punctuation">,</span>
    <span class="token string">"location"</span><span class="token punctuation">,</span>
    <span class="token string">"history"</span><span class="token punctuation">,</span>
    <span class="token string">"customElements"</span><span class="token punctuation">,</span>
    <span class="token string">"locationbar"</span><span class="token punctuation">,</span>
    <span class="token string">"menubar"</span><span class="token punctuation">,</span>
    <span class="token string">" personalbar"</span><span class="token punctuation">,</span>
    <span class="token string">"scrollbars"</span><span class="token punctuation">,</span>
    <span class="token string">"statusbar"</span><span class="token punctuation">,</span>
    <span class="token string">"toolbar"</span><span class="token punctuation">,</span>
    <span class="token string">"status"</span><span class="token punctuation">,</span>
    <span class="token string">"close"</span><span class="token punctuation">,</span>
    <span class="token string">"closed"</span><span class="token punctuation">,</span>
    <span class="token string">"stop"</span><span class="token punctuation">,</span>
    <span class="token string">"focus"</span><span class="token punctuation">,</span>
    <span class="token string">" blur"</span><span class="token punctuation">,</span>
    <span class="token string">"frames"</span><span class="token punctuation">,</span>
    <span class="token string">"length"</span><span class="token punctuation">,</span>
    <span class="token string">"top"</span><span class="token punctuation">,</span>
    <span class="token string">"opener"</span><span class="token punctuation">,</span>
    <span class="token string">"parent"</span><span class="token punctuation">,</span>
    <span class="token string">"frameElement"</span><span class="token punctuation">,</span>
    <span class="token string">"open"</span><span class="token punctuation">,</span>
    <span class="token string">"navigator"</span><span class="token punctuation">,</span>
    <span class="token string">"applicationCache"</span><span class="token punctuation">,</span>
    <span class="token string">"alert"</span><span class="token punctuation">,</span>
    <span class="token string">"confirm"</span><span class="token punctuation">,</span>
    <span class="token string">"prompt"</span><span class="token punctuation">,</span>
    <span class="token string">"print"</span><span class="token punctuation">,</span>
    <span class="token string">"postMessage"</span><span class="token punctuation">,</span>
    <span class="token string">"console"</span><span class="token punctuation">,</span>
  <span class="token punctuation">]</span><span class="token punctuation">;</span>
  objects<span class="token punctuation">.</span><span class="token function">forEach</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">o</span><span class="token punctuation">)</span> <span class="token operator">=></span> windowprops<span class="token punctuation">.</span><span class="token function">add</span><span class="token punctuation">(</span>o<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  names <span class="token operator">=</span> names<span class="token punctuation">.</span><span class="token function">filter</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">e</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token operator">!</span>windowprops<span class="token punctuation">.</span><span class="token function">has</span><span class="token punctuation">(</span>e<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>

<span class="token comment">//https://html.spec.whatwg.org/</span>

<span class="token punctuation">&#123;</span>
  <span class="token keyword">let</span> interfaces <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Set</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  objects <span class="token operator">=</span> <span class="token punctuation">[</span>
    <span class="token string">"ApplicationCache"</span><span class="token punctuation">,</span>
    <span class="token string">"AudioTrack"</span><span class="token punctuation">,</span>
    <span class="token string">"AudioTrackList"</span><span class="token punctuation">,</span>
    <span class="token string">"BarProp"</span><span class="token punctuation">,</span>
    <span class="token string">"BeforeUnloadEvent"</span><span class="token punctuation">,</span>
    <span class="token string">"BroadcastChannel"</span><span class="token punctuation">,</span>
    <span class="token string">"CanvasGradient"</span><span class="token punctuation">,</span>
    <span class="token string">"CanvasPattern"</span><span class="token punctuation">,</span>
    <span class="token string">"CanvasRenderingContext2D"</span><span class="token punctuation">,</span>
    <span class="token string">"CloseEvent"</span><span class="token punctuation">,</span>
    <span class="token string">"CustomElementRegistry"</span><span class="token punctuation">,</span>
    <span class="token string">"DOMStringList"</span><span class="token punctuation">,</span>
    <span class="token string">"DOMStringMap"</span><span class="token punctuation">,</span>
    <span class="token string">"DataTransfer"</span><span class="token punctuation">,</span>
    <span class="token string">"DataTransferItem"</span><span class="token punctuation">,</span>
    <span class="token string">"DataTransferItemList"</span><span class="token punctuation">,</span>
    <span class="token string">"DedicatedWorkerGlobalScope"</span><span class="token punctuation">,</span>
    <span class="token string">"Document"</span><span class="token punctuation">,</span>
    <span class="token string">"DragEvent"</span><span class="token punctuation">,</span>
    <span class="token string">"ErrorEvent"</span><span class="token punctuation">,</span>
    <span class="token string">"EventSource"</span><span class="token punctuation">,</span>
    <span class="token string">"External"</span><span class="token punctuation">,</span>
    <span class="token string">"FormDataEvent"</span><span class="token punctuation">,</span>
    <span class="token string">"HTMLAllCollection"</span><span class="token punctuation">,</span>
    <span class="token string">"HashChangeEvent"</span><span class="token punctuation">,</span>
    <span class="token string">"History"</span><span class="token punctuation">,</span>
    <span class="token string">"ImageBitmap"</span><span class="token punctuation">,</span>
    <span class="token string">"ImageBitmapRenderingContext"</span><span class="token punctuation">,</span>
    <span class="token string">"ImageData"</span><span class="token punctuation">,</span>
    <span class="token string">"Location"</span><span class="token punctuation">,</span>
    <span class="token string">"MediaError"</span><span class="token punctuation">,</span>
    <span class="token string">"MessageChannel"</span><span class="token punctuation">,</span>
    <span class="token string">"MessageEvent"</span><span class="token punctuation">,</span>
    <span class="token string">"MessagePort"</span><span class="token punctuation">,</span>
    <span class="token string">"MimeType"</span><span class="token punctuation">,</span>
    <span class="token string">"MimeTypeArray"</span><span class="token punctuation">,</span>
    <span class="token string">"Navigator"</span><span class="token punctuation">,</span>
    <span class="token string">"OffscreenCanvas"</span><span class="token punctuation">,</span>
    <span class="token string">"OffscreenCanvasRenderingContext2D"</span><span class="token punctuation">,</span>
    <span class="token string">"PageTransitionEvent"</span><span class="token punctuation">,</span>
    <span class="token string">"Path2D"</span><span class="token punctuation">,</span>
    <span class="token string">"Plugin"</span><span class="token punctuation">,</span>
    <span class="token string">"PluginArray"</span><span class="token punctuation">,</span>
    <span class="token string">"PopStateEvent"</span><span class="token punctuation">,</span>
    <span class="token string">"PromiseRejectionEvent"</span><span class="token punctuation">,</span>
    <span class="token string">"RadioNodeList"</span><span class="token punctuation">,</span>
    <span class="token string">"SharedWorker"</span><span class="token punctuation">,</span>
    <span class="token string">"SharedWorkerGlobalScope"</span><span class="token punctuation">,</span>
    <span class="token string">"Storage"</span><span class="token punctuation">,</span>
    <span class="token string">"StorageEvent"</span><span class="token punctuation">,</span>
    <span class="token string">"TextMetrics"</span><span class="token punctuation">,</span>
    <span class="token string">"TextTrack"</span><span class="token punctuation">,</span>
    <span class="token string">"TextTrackCue"</span><span class="token punctuation">,</span>
    <span class="token string">"TextTrackCueList"</span><span class="token punctuation">,</span>
    <span class="token string">"TextTrackList"</span><span class="token punctuation">,</span>
    <span class="token string">"TimeRanges"</span><span class="token punctuation">,</span>
    <span class="token string">"TrackEvent"</span><span class="token punctuation">,</span>
    <span class="token string">"ValidityState"</span><span class="token punctuation">,</span>
    <span class="token string">"VideoTrack"</span><span class="token punctuation">,</span>
    <span class="token string">"VideoTrackList"</span><span class="token punctuation">,</span>
    <span class="token string">"WebSocket"</span><span class="token punctuation">,</span>
    <span class="token string">"Window"</span><span class="token punctuation">,</span>
    <span class="token string">"Worker"</span><span class="token punctuation">,</span>
    <span class="token string">"WorkerGlobalScope"</span><span class="token punctuation">,</span>
    <span class="token string">"WorkerLocation"</span><span class="token punctuation">,</span>
    <span class="token string">"WorkerNavigator"</span><span class="token punctuation">,</span>
  <span class="token punctuation">]</span><span class="token punctuation">;</span>
  objects<span class="token punctuation">.</span><span class="token function">forEach</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">o</span><span class="token punctuation">)</span> <span class="token operator">=></span> interfaces<span class="token punctuation">.</span><span class="token function">add</span><span class="token punctuation">(</span>o<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

  names <span class="token operator">=</span> names<span class="token punctuation">.</span><span class="token function">filter</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">e</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token operator">!</span>interfaces<span class="token punctuation">.</span><span class="token function">has</span><span class="token punctuation">(</span>e<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>

<span class="token comment">//http://www.ecma-international.org/ecma-402/5.0/index.html#Title</span>

names <span class="token operator">=</span> names<span class="token punctuation">.</span><span class="token function">filter</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">e</span><span class="token punctuation">)</span> <span class="token operator">=></span> e <span class="token operator">!=</span> <span class="token string">"Intl"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">//https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15</span>

names <span class="token operator">=</span> <span class="token function">filterOut</span><span class="token punctuation">(</span>names<span class="token punctuation">,</span> <span class="token punctuation">[</span>
  <span class="token string">"WebGLVertexArrayObject"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGLTransformFeedback"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGLSync"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGLSampler"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGLQuery"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGL2RenderingContext"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGLContextEvent"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGLObject"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGLBuffer"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGLFramebuffer"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGLProgram"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGLRenderbuffer"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGLShader"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGLTexture"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGLUniformLocation"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGLActiveInfo"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGLShaderPrecisionFormat"</span><span class="token punctuation">,</span>
  <span class="token string">"WebGLRenderingContext"</span><span class="token punctuation">,</span>
<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">//https://www.w3.org/TR/webaudio/</span>

names <span class="token operator">=</span> <span class="token function">filterOut</span><span class="token punctuation">(</span>names<span class="token punctuation">,</span> <span class="token punctuation">[</span>
  <span class="token string">"AudioContext"</span><span class="token punctuation">,</span>
  <span class="token string">"AudioNode"</span><span class="token punctuation">,</span>
  <span class="token string">"AnalyserNode"</span><span class="token punctuation">,</span>
  <span class="token string">"AudioBuffer"</span><span class="token punctuation">,</span>
  <span class="token string">"AudioBufferSourceNode"</span><span class="token punctuation">,</span>
  <span class="token string">"AudioDestinationNode"</span><span class="token punctuation">,</span>
  <span class="token string">"AudioParam"</span><span class="token punctuation">,</span>
  <span class="token string">"AudioListener"</span><span class="token punctuation">,</span>
  <span class="token string">"AudioWorklet"</span><span class="token punctuation">,</span>
  <span class="token string">"AudioWorkletGlobalScope"</span><span class="token punctuation">,</span>
  <span class="token string">"AudioWorkletNode"</span><span class="token punctuation">,</span>
  <span class="token string">"AudioWorkletProcessor"</span><span class="token punctuation">,</span>
  <span class="token string">"BiquadFilterNode"</span><span class="token punctuation">,</span>
  <span class="token string">"ChannelMergerNode"</span><span class="token punctuation">,</span>
  <span class="token string">"ChannelSplitterNode"</span><span class="token punctuation">,</span>
  <span class="token string">"ConstantSourceNode"</span><span class="token punctuation">,</span>
  <span class="token string">"ConvolverNode"</span><span class="token punctuation">,</span>
  <span class="token string">"DelayNode"</span><span class="token punctuation">,</span>
  <span class="token string">"DynamicsCompressorNode"</span><span class="token punctuation">,</span>
  <span class="token string">"GainNode"</span><span class="token punctuation">,</span>
  <span class="token string">"IIRFilterNode"</span><span class="token punctuation">,</span>
  <span class="token string">"MediaElementAudioSourceNode"</span><span class="token punctuation">,</span>
  <span class="token string">"MediaStreamAudioSourceNode"</span><span class="token punctuation">,</span>
  <span class="token string">"MediaStreamTrackAudioSourceNode"</span><span class="token punctuation">,</span>
  <span class="token string">"MediaStreamAudioDestinationNode"</span><span class="token punctuation">,</span>
  <span class="token string">"PannerNode"</span><span class="token punctuation">,</span>
  <span class="token string">"PeriodicWave"</span><span class="token punctuation">,</span>
  <span class="token string">"OscillatorNode"</span><span class="token punctuation">,</span>
  <span class="token string">"StereoPannerNode"</span><span class="token punctuation">,</span>
  <span class="token string">"WaveShaperNode"</span><span class="token punctuation">,</span>
  <span class="token string">"ScriptProcessorNode"</span><span class="token punctuation">,</span>
  <span class="token string">"AudioProcessingEvent"</span><span class="token punctuation">,</span>
<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">//https://encoding.spec.whatwg.org/#dom-textencoder</span>

names <span class="token operator">=</span> <span class="token function">filterOut</span><span class="token punctuation">(</span>names<span class="token punctuation">,</span> <span class="token punctuation">[</span>
  <span class="token string">"TextDecoder"</span><span class="token punctuation">,</span>
  <span class="token string">"TextEncoder"</span><span class="token punctuation">,</span>
  <span class="token string">"TextDecoderStream"</span><span class="token punctuation">,</span>
  <span class="token string">"TextEncoderStream"</span><span class="token punctuation">,</span>
<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">//https://streams.spec.whatwg.org/#blqs-class</span>

names <span class="token operator">=</span> <span class="token function">filterOut</span><span class="token punctuation">(</span>names<span class="token punctuation">,</span> <span class="token punctuation">[</span>
  <span class="token string">"ReadableStream"</span><span class="token punctuation">,</span>
  <span class="token string">"ReadableStreamDefaultReader"</span><span class="token punctuation">,</span>
  <span class="token string">"ReadableStreamBYOBReader"</span><span class="token punctuation">,</span>
  <span class="token string">"ReadableStreamDefaultController"</span><span class="token punctuation">,</span>
  <span class="token string">"ReadableByteStreamController"</span><span class="token punctuation">,</span>
  <span class="token string">"ReadableStreamBYOBRequest"</span><span class="token punctuation">,</span>
  <span class="token string">"WritableStream"</span><span class="token punctuation">,</span>
  <span class="token string">"WritableStreamDefaultWriter"</span><span class="token punctuation">,</span>
  <span class="token string">"WritableStreamDefaultController"</span><span class="token punctuation">,</span>
  <span class="token string">"TransformStream"</span><span class="token punctuation">,</span>
  <span class="token string">"TransformStreamDefaultController"</span><span class="token punctuation">,</span>
  <span class="token string">"ByteLengthQueuingStrategy"</span><span class="token punctuation">,</span>
  <span class="token string">"CountQueuingStrategy"</span><span class="token punctuation">,</span>
<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">//https://wicg.github.io/BackgroundSync/spec/#sync-manager-interface</span>

names <span class="token operator">=</span> <span class="token function">filterOut</span><span class="token punctuation">(</span>names<span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token string">"SyncManager"</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

                
            </div>
            <hr/>

            

    <div class="reprint" id="reprint-statement">
        
            <div class="reprint__author">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-user">
                        文章作者:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="/about" rel="external nofollow noreferrer">阿汪同学</a>
                </span>
            </div>
            <div class="reprint__type">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-link">
                        文章链接:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="https://httishere.github.io/2021/12/20/yuque/iclyhn/">https://httishere.github.io/2021/12/20/yuque/iclyhn/</a>
                </span>
            </div>
            <div class="reprint__notice">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-copyright">
                        版权声明:
                    </i>
                </span>
                <span class="reprint-info">
                    本博客所有文章除特別声明外，均采用
                    <a href="https://creativecommons.org/licenses/by/4.0/deed.zh" rel="external nofollow noreferrer" target="_blank">CC BY 4.0</a>
                    许可协议。转载请注明来源
                    <a href="/about" target="_blank">阿汪同学</a>
                    !
                </span>
            </div>
        
    </div>

    <script async defer>
      document.addEventListener("copy", function (e) {
        let toastHTML = '<span>复制成功，请遵循本文的转载规则</span><button class="btn-flat toast-action" onclick="navToReprintStatement()" style="font-size: smaller">查看</a>';
        M.toast({html: toastHTML})
      });

      function navToReprintStatement() {
        $("html, body").animate({scrollTop: $("#reprint-statement").offset().top - 80}, 800);
      }
    </script>



            <div class="tag_share" style="display: block;">
                <div class="post-meta__tag-list" style="display: inline-block;">
                    
                        <div class="article-tag">
                            
                                <a href="/tags/ROAD-6/">
                                    <span class="chip bg-color">ROAD 6</span>
                                </a>
                            
                        </div>
                    
                </div>
                <div class="post_share" style="zoom: 80%; width: fit-content; display: inline-block; float: right; margin: -0.15rem 0;">
                    <link rel="stylesheet" type="text/css" href="/libs/share/css/share.min.css">
<div id="article-share">

    
    <div class="social-share" data-sites="twitter,facebook,google,qq,qzone,wechat,weibo,douban,linkedin" data-wechat-qrcode-helper="<p>微信扫一扫即可分享！</p>"></div>
    <script src="/libs/share/js/social-share.min.js"></script>
    

    

</div>

                </div>
            </div>
            
                <style>
    #reward {
        margin: 40px 0;
        text-align: center;
    }

    #reward .reward-link {
        font-size: 1.4rem;
        line-height: 38px;
    }

    #reward .btn-floating:hover {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    #rewardModal {
        width: 320px;
        height: 350px;
    }

    #rewardModal .reward-title {
        margin: 15px auto;
        padding-bottom: 5px;
    }

    #rewardModal .modal-content {
        padding: 10px;
    }

    #rewardModal .close {
        position: absolute;
        right: 15px;
        top: 15px;
        color: rgba(0, 0, 0, 0.5);
        font-size: 1.3rem;
        line-height: 20px;
        cursor: pointer;
    }

    #rewardModal .close:hover {
        color: #ef5350;
        transform: scale(1.3);
        -moz-transform:scale(1.3);
        -webkit-transform:scale(1.3);
        -o-transform:scale(1.3);
    }

    #rewardModal .reward-tabs {
        margin: 0 auto;
        width: 210px;
    }

    .reward-tabs .tabs {
        height: 38px;
        margin: 10px auto;
        padding-left: 0;
    }

    .reward-content ul {
        padding-left: 0 !important;
    }

    .reward-tabs .tabs .tab {
        height: 38px;
        line-height: 38px;
    }

    .reward-tabs .tab a {
        color: #fff;
        background-color: #ccc;
    }

    .reward-tabs .tab a:hover {
        background-color: #ccc;
        color: #fff;
    }

    .reward-tabs .wechat-tab .active {
        color: #fff !important;
        background-color: #22AB38 !important;
    }

    .reward-tabs .alipay-tab .active {
        color: #fff !important;
        background-color: #019FE8 !important;
    }

    .reward-tabs .reward-img {
        width: 210px;
        height: 210px;
    }
</style>

<div id="reward">
    <a href="#rewardModal" class="reward-link modal-trigger btn-floating btn-medium waves-effect waves-light red">赏</a>

    <!-- Modal Structure -->
    <div id="rewardModal" class="modal">
        <div class="modal-content">
            <a class="close modal-close"><i class="fas fa-times"></i></a>
            <h4 class="reward-title">你的赏识是我前进的动力</h4>
            <div class="reward-content">
                <div class="reward-tabs">
                    <ul class="tabs row">
                        <li class="tab col s6 alipay-tab waves-effect waves-light"><a href="#alipay">支付宝</a></li>
                        <li class="tab col s6 wechat-tab waves-effect waves-light"><a href="#wechat">微 信</a></li>
                    </ul>
                    <div id="alipay">
                        <img src="/medias/reward/reward-alipay.jpg" class="reward-img" alt="支付宝打赏二维码">
                    </div>
                    <div id="wechat">
                        <img src="/medias/reward/reward.jpg" class="reward-img" alt="微信打赏二维码">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {
        $('.tabs').tabs();
    });
</script>

            
        </div>
    </div>

    

    

    

    

    
        <style>
</style>

<link rel="stylesheet" href="https://unpkg.com/@waline/client@v3/dist/waline.css">
<div class="card valine-card" data-aos="fade-up">
    <div class="comment_headling" style="font-size: 20px; font-weight: 700; position: relative; padding-left: 20px; top: 15px; padding-bottom: 5px;">
        <i class="fas fa-comments fa-fw" aria-hidden="true"></i>
        <span>评论</span>
    </div>
    <div id="vcomments" class="card-content" style="display: grid">
    </div>
</div>

<script src="/libs/valine/av-min.js"></script>
<script type="module">
    import { init } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
    init({
        el: '#vcomments',
        serverURL: 'https://waline-1-x3506913.deta.app/',
        //appId: '2',
        //appKey: '2',
        //notify: 'false' === 'true',
        //verify: 'false' === 'true',
        //visitor: 'true' === 'true',
        //avatar: 'mm',
        //pageSize: '10',
        //lang: 'zh-cn',
        //placeholder: 'just go go'
    });
</script>

    

    

    

    

<article id="prenext-posts" class="prev-next articles">
    <div class="row article-row">
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge left-badge text-color">
                <i class="fas fa-chevron-left"></i>&nbsp;上一篇</div>
            <div class="card">
                <a href="/2021/12/21/yuque/epg357/">
                    <div class="card-image">
                        
                        
                        <img src="/medias/featureimages/cover-bg-5.jpg" class="responsive-img"
                            alt="「SASS」使用指南（同步）">
                        
                        <span class="card-title">「SASS」使用指南（同步）</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                        
                        
                    </div>
                    <div class="publish-info">
                        <span class="publish-date">
                            <i class="far fa-clock fa-fw icon-date"></i>2021-12-21
                        </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/SASS/" class="post-category">
                                SASS
                            </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/SASS/">
                        <span class="chip bg-color">SASS</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge right-badge text-color">
                下一篇&nbsp;<i class="fas fa-chevron-right"></i>
            </div>
            <div class="card">
                <a href="/2021/12/17/yuque/qvtbgk/">
                    <div class="card-image">
                        
                        
                        <img src="/medias/featureimages/cover-bg-0.jpg" class="responsive-img"
                            alt="「ROAD 6」CSS-动画">
                        
                        <span class="card-title">「ROAD 6」CSS-动画</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                        
                        
                    </div>
                    <div class="publish-info">
                        <span class="publish-date">
                            <i class="far fa-clock fa-fw icon-date"></i>2021-12-17
                        </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/%E5%A4%A7%E5%89%8D%E7%AB%AF/" class="post-category">
                                大前端
                            </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/ROAD-6/">
                        <span class="chip bg-color">ROAD 6</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
    </div>
</article>
</div>



<!-- 代码块功能依赖 -->
<script type="text/javascript" src="/libs/codeBlock/codeBlockFuction.js"></script>

<!-- 代码语言 -->

<script type="text/javascript" src="/libs/codeBlock/codeLang.js"></script>


<!-- 代码块复制 -->

<script type="text/javascript" src="/libs/codeBlock/codeCopy.js"></script>


<!-- 代码块收缩 -->

<script type="text/javascript" src="/libs/codeBlock/codeShrink.js"></script>


    </div>
    <div id="toc-aside" class="expanded col l3 hide-on-med-and-down">
        <div class="toc-widget card" style="background-color: white;">
            <div class="toc-title"><i class="far fa-list-alt"></i>&nbsp;&nbsp;目录</div>
            <div id="toc-content"></div>
        </div>
    </div>
</div>

<!-- TOC 悬浮按钮. -->

<div id="floating-toc-btn" class="hide-on-med-and-down">
    <a class="btn-floating btn-large bg-color">
        <i class="fas fa-list-ul"></i>
    </a>
</div>


<script src="/libs/tocbot/tocbot.min.js"></script>
<script>
    $(function () {
        tocbot.init({
            tocSelector: '#toc-content',
            contentSelector: '#articleContent',
            headingsOffset: -($(window).height() * 0.4 - 45),
            collapseDepth: Number('0'),
            headingSelector: 'h1, h2, h3, h4'
        });

        // modify the toc link href to support Chinese.
        let i = 0;
        let tocHeading = 'toc-heading-';
        $('#toc-content a').each(function () {
            $(this).attr('href', '#' + tocHeading + (++i));
        });

        // modify the heading title id to support Chinese.
        i = 0;
        $('#articleContent').children('h1, h2, h3, h4').each(function () {
            $(this).attr('id', tocHeading + (++i));
        });

        // Set scroll toc fixed.
        let tocHeight = parseInt($(window).height() * 0.4 - 64);
        let $tocWidget = $('.toc-widget');
        $(window).scroll(function () {
            let scroll = $(window).scrollTop();
            /* add post toc fixed. */
            if (scroll > tocHeight) {
                $tocWidget.addClass('toc-fixed');
            } else {
                $tocWidget.removeClass('toc-fixed');
            }
        });

        
        /* 修复文章卡片 div 的宽度. */
        let fixPostCardWidth = function (srcId, targetId) {
            let srcDiv = $('#' + srcId);
            if (srcDiv.length === 0) {
                return;
            }

            let w = srcDiv.width();
            if (w >= 450) {
                w = w + 21;
            } else if (w >= 350 && w < 450) {
                w = w + 18;
            } else if (w >= 300 && w < 350) {
                w = w + 16;
            } else {
                w = w + 14;
            }
            $('#' + targetId).width(w);
        };

        // 切换TOC目录展开收缩的相关操作.
        const expandedClass = 'expanded';
        let $tocAside = $('#toc-aside');
        let $mainContent = $('#main-content');
        $('#floating-toc-btn .btn-floating').click(function () {
            if ($tocAside.hasClass(expandedClass)) {
                $tocAside.removeClass(expandedClass).hide();
                $mainContent.removeClass('l9');
            } else {
                $tocAside.addClass(expandedClass).show();
                $mainContent.addClass('l9');
            }
            fixPostCardWidth('artDetail', 'prenext-posts');
        });
        
    });
</script>

    

</main>




    <footer class="page-footer bg-color">
    
    <div class="container row center-align" style="margin-bottom: 0px !important;">
        <div class="col s12 m8 l8 copy-right">
            Copyright&nbsp;&copy;
            
                <span id="year">2019-2024</span>
            
            <span id="year">2019</span>
            <a href="/about" target="_blank">阿汪同学</a>
            
            
            
            
            
            
            <span id="busuanzi_container_site_pv">
                |&nbsp;<i class="far fa-eye"></i>&nbsp;总访问量:&nbsp;<span id="busuanzi_value_site_pv"
                    class="white-color"></span>&nbsp;次
            </span>
            
            
            <span id="busuanzi_container_site_uv">
                |&nbsp;<i class="fas fa-users"></i>&nbsp;总访问人数:&nbsp;<span id="busuanzi_value_site_uv"
                    class="white-color"></span>&nbsp;人
            </span>
            
            <br>
            
            <br>
            
        </div>
        <div class="col s12 m4 l4 social-link social-statis">
    <a href="https://github.com/httIsHere" class="tooltipped" target="_blank" data-tooltip="访问我的GitHub" data-position="top" data-delay="50">
        <i class="fab fa-github"></i>
    </a>



    <a href="mailto:httishere0728@gmail.com" class="tooltipped" target="_blank" data-tooltip="邮件联系我" data-position="top" data-delay="50">
        <i class="fas fa-envelope-open"></i>
    </a>













</div>
    </div>
</footer>

<div class="progress-bar"></div>


    <!-- 搜索遮罩框 -->
<div id="searchModal" class="modal">
    <div class="modal-content">
        <div class="search-header">
            <span class="title"><i class="fas fa-search"></i>&nbsp;&nbsp;搜索</span>
            <input type="search" id="searchInput" name="s" placeholder="请输入搜索的关键字"
                   class="search-input">
        </div>
        <div id="searchResult"></div>
    </div>
</div>

<script type="text/javascript">
$(function () {
    var searchFunc = function (path, search_id, content_id) {
        'use strict';
        $.ajax({
            url: path,
            dataType: "xml",
            success: function (xmlResponse) {
                // get the contents from search data
                var datas = $("entry", xmlResponse).map(function () {
                    return {
                        title: $("title", this).text(),
                        content: $("content", this).text(),
                        url: $("url", this).text()
                    };
                }).get();
                var $input = document.getElementById(search_id);
                var $resultContent = document.getElementById(content_id);
                $input.addEventListener('input', function () {
                    var str = '<ul class=\"search-result-list\">';
                    var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
                    $resultContent.innerHTML = "";
                    if (this.value.trim().length <= 0) {
                        return;
                    }
                    // perform local searching
                    datas.forEach(function (data) {
                        var isMatch = true;
                        var data_title = data.title.trim().toLowerCase();
                        var data_content = data.content.trim().replace(/<[^>]+>/g, "").toLowerCase();
                        var data_url = data.url;
                        data_url = data_url.indexOf('/') === 0 ? data.url : '/' + data_url;
                        var index_title = -1;
                        var index_content = -1;
                        var first_occur = -1;
                        // only match artiles with not empty titles and contents
                        if (data_title !== '' && data_content !== '') {
                            keywords.forEach(function (keyword, i) {
                                index_title = data_title.indexOf(keyword);
                                index_content = data_content.indexOf(keyword);
                                if (index_title < 0 && index_content < 0) {
                                    isMatch = false;
                                } else {
                                    if (index_content < 0) {
                                        index_content = 0;
                                    }
                                    if (i === 0) {
                                        first_occur = index_content;
                                    }
                                }
                            });
                        }
                        // show search results
                        if (isMatch) {
                            str += "<li><a href='" + data_url + "' class='search-result-title'>" + data_title + "</a>";
                            var content = data.content.trim().replace(/<[^>]+>/g, "");
                            if (first_occur >= 0) {
                                // cut out 100 characters
                                var start = first_occur - 20;
                                var end = first_occur + 80;
                                if (start < 0) {
                                    start = 0;
                                }
                                if (start === 0) {
                                    end = 100;
                                }
                                if (end > content.length) {
                                    end = content.length;
                                }
                                var match_content = content.substr(start, end);
                                // highlight all keywords
                                keywords.forEach(function (keyword) {
                                    var regS = new RegExp(keyword, "gi");
                                    match_content = match_content.replace(regS, "<em class=\"search-keyword\">" + keyword + "</em>");
                                });

                                str += "<p class=\"search-result\">" + match_content + "...</p>"
                            }
                            str += "</li>";
                        }
                    });
                    str += "</ul>";
                    $resultContent.innerHTML = str;
                });
            }
        });
    };

    searchFunc('/search.xml', 'searchInput', 'searchResult');
});
</script>

    <!-- 回到顶部按钮 -->
<div id="backTop" class="top-scroll">
    <a class="btn-floating btn-large waves-effect waves-light" href="#!">
        <i class="fas fa-arrow-up"></i>
    </a>
</div>


    <script src="/libs/materialize/materialize.min.js"></script>
    <script src="/libs/masonry/masonry.pkgd.min.js"></script>
    <script src="/libs/aos/aos.js"></script>
    <script src="/libs/scrollprogress/scrollProgress.min.js"></script>
    <script src="/libs/lightGallery/js/lightgallery-all.min.js"></script>
    <script src="/js/matery.js"></script>

    <!-- Baidu Analytics -->

    <!-- Baidu Push -->

<script>
    (function () {
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        } else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>

    
    
    <script async src="/libs/others/busuanzi.pure.mini.js"></script>
    

    

    

	
    

    

    

    
    <script src="/libs/instantpage/instantpage.js" type="module"></script>
    

</body>

</html>
